Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update app-testing script #603

Draft
wants to merge 36 commits into
base: dev_branch
Choose a base branch
from

Conversation

davidmallasen
Copy link
Member

@davidmallasen davidmallasen commented Nov 28, 2024

TO-DO:

  • Run the compilation flow with both gcc and clang
  • Fix verilator flow
  • Fix compiling of applications

Fixes #344

@LuigiGiuffrida98
Copy link
Contributor

Traceback (most recent call last): File ".github/workflows/test-apps/test_apps.py", line 466, in <module> main() File ".github/workflows/test-apps/test_apps.py", line 434, in main simulation_result = run_app(an_app, simulator) File ".github/workflows/test-apps/test_apps.py", line 172, in run_app run_output = subprocess.run( File "/opt/conda/envs/core-v-mini-mcu/lib/python3.8/subprocess.py", line 493, in run with Popen(*popenargs, **kwargs) as process: File "/opt/conda/envs/core-v-mini-mcu/lib/python3.8/subprocess.py", line 858, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/opt/conda/envs/core-v-mini-mcu/lib/python3.8/subprocess.py", line 1720, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: './Vtestharness'

The script tries to run the applications even if the verilator model did not compile correctly.

@LuigiGiuffrida98
Copy link
Contributor

LuigiGiuffrida98 commented Dec 9, 2024

=================================
Results:

19 out of 33 apps finished successfully.
3 apps were skipped.
- example_spi_read
- example_spi_write
- example_spidma_powergate
11 apps failed to compile.
- example_dma_2d
- example_i2s
- example_dma_multichannel
- example_gpio_intr
- example_iffifo
- example_dma_external
- example_simple_accelerator
- example_power_manager
- example_sdk_spi_flash
- example_data_processing_from_flash
- example_ext_memory

@davidmallasen
Copy link
Member Author

davidmallasen commented Dec 10, 2024

Traceback (most recent call last): File ".github/workflows/test-apps/test_apps.py", line 466, in <module> main() File ".github/workflows/test-apps/test_apps.py", line 434, in main simulation_result = run_app(an_app, simulator) File ".github/workflows/test-apps/test_apps.py", line 172, in run_app run_output = subprocess.run( File "/opt/conda/envs/core-v-mini-mcu/lib/python3.8/subprocess.py", line 493, in run with Popen(*popenargs, **kwargs) as process: File "/opt/conda/envs/core-v-mini-mcu/lib/python3.8/subprocess.py", line 858, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/opt/conda/envs/core-v-mini-mcu/lib/python3.8/subprocess.py", line 1720, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: './Vtestharness'

The script tries to run the applications even if the verilator model did not compile correctly.

That should not happen because of this:

I checked locally and it's failing from some verilator warnings. For some reason, the error exit code (which is different from 0) is not caught by the subprocess.CalledProcessError. We'll have to waive those warnings in verilator and check that the error message simulation_build_output does not contain any error.

@LuigiGiuffrida98
Copy link
Contributor

LuigiGiuffrida98 commented Dec 10, 2024

🎉 Verilator 5 supports timing simulation, the spiflash model have been compiled with verilator. Getting closer to run all the examples in CI. 🎊

⚠️ At the current status, Verilator does not generate any lint warning, but the docker is missing some packages to compile the model.

⚠️ All the template files have been added as a dependency of a lock file generated with mcu-gen in order to regenerate the mcu everytime a tpl file is edited, the lockfile prevents the regeneration every time a target is run.

@davidmallasen
Copy link
Member Author

@LuigiGiuffrida98 What is the status of this? We should at least write down the scope and status of the PR so we don't let it go

@LuigiGiuffrida98
Copy link
Contributor

@davidmallasen It can be useful to split this into two PRs, one to update gcc and a different one to update verilator (being the second a longer task).

@LuigiGiuffrida98
Copy link
Contributor

LuigiGiuffrida98 commented Feb 6, 2025

Just give me the time to change the gcc version in the docker and we can keep this PR to update the software accordingly.

@davidmallasen
Copy link
Member Author

Perfect! I was going to suggest splitting into something that we can merge soonish and then continue working on the more time-consuming part, so that sounds good

@davidmallasen
Copy link
Member Author

Is the ci/scripts/install_verilator.sh used anywhere? If not, we could remove it from that repo because I see that the verilator version it installs is different from the one we say in the docs (and I believe in the docker).

@davidmallasen davidmallasen changed the base branch from main to develop February 12, 2025 11:55
@davidmallasen davidmallasen changed the base branch from develop to dev_branch February 28, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

upgrade Verilator from 4.2 to 5.* version
2 participants